<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <base href="<%=basePath%>"/>
    
    <title>厦大植物检索与交流系统</title>
	<meta http-equiv="pragma" content="no-cache"/>
	<meta http-equiv="cache-control" content="no-cache"/>
	<meta http-equiv="expires" content="0"/>    
	<meta http-equiv="keywords" content="厦大,植物检索,"/>
	<meta http-equiv="description" content="厦大植物检索与交流系统"/>
	<link rel="stylesheet" type="text/css" href="css/common.css"/>
	<link rel="stylesheet" type="text/css" href="css/register.css"/>
  	<link rel="stylesheet" type="text/css" href="css/jquery.ui.datepicker.css"/>
   	<link rel="stylesheet" type="text/css" href="css/jquery-ui-1.8.18.custom.css"/>
   	<link rel="stylesheet" type="text/css" href="css/validationEngine.jquery.css"/>
    <script type="text/javascript" language="javascript" src="js/jquery-1.7.1.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.dropdown.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.ui.core.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.effects.core.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery.effects.slide.js"></script>
 	<script type="text/javascript" language="javascript" src="js/jquery.ui.datepicker.js"></script>
 <!--  	<script type="text/javascript" language="javascript" src="js/jquery.ui.datepicker-zh-CN.js"></script>
  -->
  	<script type="text/javascript" language="javascript" src="js/jquery.validationEngine-zh_CN.js" charset="utf-8"></script>
  	<script type="text/javascript" language="javascript" src="js/jquery.validationEngine.js" charset="utf-8"></script>
  	<script type="text/javascript" language="javascript" src="system/register.js"></script>
  <script>
//初始化日期控件
	$(function() {
		$( "#birthday" ).datepicker({
			changeMonth: true, 
			changeYear: true,
			dateFormat: "yy-mm-dd"
		});
	//	$( "#birthday" ).datepicker( "option",
	//			$.datepicker.regional[ "zh-CN" ] );
		$( "#birthday" ).datepicker( "option", "showAnim", "slide" );
		$( "#birthday" ).datepicker( "option", "yearRange", "1900:2012" );
	});
	
	</script>
	
  </head>
  
  <body>
<div id="wrapper">
	<div id="logo">
		<h1><a href="index.html">厦大植物检索与交流平台</a></h1>
	</div>
	<hr />
	<!-- end #logo -->
	<div id="header">
		<% 
			Integer userId = (Integer)request.getSession().getAttribute("userId");
			Integer role = (Integer)request.getSession().getAttribute("role");
		%>
		<div id="menu">
			<ul class="dropdown">
				<li><a href="index.html">首页</a>
				</li>
				<li><a >植物检索</a>
					<ul class="sub_menu">
     				   <li><a href="plantManager-showSubject.html">专题库查找</a></li>
   					   <li><a href="plantManager-kindList.html?move=0&page.currentPage=1&keOrShu=1">分等级检索</a></li>
        			   <li><a href="retrieval-toMultichannel.html">多通道检索</a></li>
					   <li><a href="plantManager-mapSearch.html">地图植物定位</a></li>
					</ul>
				</li>
   				<% if(userId != null && userId > 0 ){ %>
				<li><a >植物信息管理</a>
					<ul class="sub_menu">
     				   <li><a href="plantManager-toAddPlant.html">新增植物</a></li>
   					   <li><a href="plantManager-toAddSubject.html">新增专题</a></li>
   					    <% if( role != null && role == 3){ %>
   					   <li><a href="plant-listKindKe.html">分类管理</a></li>
   					   <%} %>
					</ul>
				</li>
   				<%} %>
				<li><a>个人植物库</a>
					<ul class="sub_menu">
   					   <% if(userId != null && userId > 0 ){ %>
        			   <li><a href="system-tomodifypwd.html">修改密码</a></li>
     				   <li><a href="user-showUserInfo.html">查看个人信息</a></li>
 				       <li><a href="user-toModifyUserInfo.html">修改个人信息</a></li>
 				       <% if(userId != null && userId > 0 && role != null && role == 3){ %>
 				       <li><a href="user-userlist.html">用户管理</a></li>
 				        <%} %>
 				       <li><a href="logout.html">退出</a></li>
 				       <%}else{ %>
     				   <li><a href="system-toLogin.html?isIntercepted=1">登录</a></li>
   					   <li><a href="system-registerinfo.html">注册</a></li>
 				        <%} %>
					</ul>
				</li>
				<li><a href="forum.html">论坛</a>
				</li>
			</ul>
		</div>
		<!-- end #menu -->
	</div>
	<!-- end #header -->
	<div id="page">
		<div id="content">
			
			<div class="center">

	<div class="ctitle"><br />修改用户信息:</div>
	<div class="register">
		<s:form id="regform" action="user-modifyUserInfo.html" method="post" enctype="multipart/form-data" onsubmit="return validation();">
			<table>
				<tr>
					<td width="25%">用户名：</td>
					<td width="75%"><input type="text" id="name" value="${ user.name}" class="validate[required,maxSize[20],ajax[ajaxNameCall]] text" name="user.name"/></td>
				</tr>
				<tr>
					<td>电子邮箱：</td>
					<td><input type="text" id="email" value="${user.email}" class="validate[required,email,ajax[ajaxEmailCall]] text" name="user.email"/></td>
				</tr>
				<tr>
					<td>性别：</td>
					<td>
						<s:radio list="#{'2':'男','1':'女','0':'保密'}" name="user.sex" value="user.usex"/>
					</td>
				</tr>
				<tr>
					<td>通讯地址：</td>
					<td><input type="text" id="address" class="validate[optional,maxSize[50]] text" value="${user.address}" name="user.address"/></td>
				</tr>
				<tr>
					<td>邮政编码：</td>
					<td><input type="text" id="post" class="validate[optional,custom[integer],maxSize[6]] text" value="${user.zip}" name="user.zip"/></td>
				</tr>
				<tr>
					<td>QQ号码：</td>
					<td><input type="text" id="qq" class="validate[optional,custom[integer],maxSize[15]] text" value="${user.qqNumber}" name="user.qqNumber"/></td>
				</tr>
				<tr>
					<td>出生年份：</td>
					<td><input type="text" id="birthday" value="${user.date}" name="user.birthday" class="text" readonly="readonly"/></td>
				</tr>
				<tr>
					<td>个人头像：</td>
					
					<td><input type="file" class="file" id="upload" name="upload" accept="image/*" onchange="t1.value=this.value"/>
						<input type="text" class="text" id="t1" readonly="readonly"/>
						<input type="button" value="上传" class="addkind" id="b1" onclick="upload.click()"/>
					</td>
				</tr>
				<tr>
					<td>个性签名：</td>
					
					<td><textarea wrap="virtual" id="signal" class="validate[optional,maxSize[200]] text" value="${ user.signature}" name="user.signature"></textarea></td>
				</tr>
				<tr>
					<td><input type="submit" value="完成修改"  id="add"/></td>
					<td></td>
				</tr>
			</table>
		</s:form>
	</div>
	<!-- end #register -->
</div>
<!-- end #center -->			
		</div>
		<!-- end #content -->
		<div style="clear: both;">&nbsp;</div>
	</div>
	<!-- end #page -->
	<div id="footer">
		<p>
		<a href="index.html">返回首页</a>|
            Copyright &copy; 2012 厦门大学软件学院</p>
	</div>
	<!-- end #footer -->
</div>
</body>
</html>
